package org.cybertech.dubbo.provider.web;

import java.util.List;

import org.cybertech.dubbo.api.entity.AddressEntity;
import org.cybertech.dubbo.api.service.IAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {
	
	@Autowired
    private IAddressService addressService;
	
	@RequestMapping("/index")
	public String index(){
		return "hello index!";
	}
	
	
	/**
	 * 地址查询
	 * @return
	 */
	@RequestMapping("/address")
	public List<AddressEntity> queryAddress(){
		return addressService.findAllList();
	}
	
}
